<!-- 纵向布局 -->
<template>
	<el-container class="layout">
		<el-aside>
			<div class="menu" :style="{ width: isCollapse ? '65px' : '210px' }">
				<div class="logo flex-center">
					<!-- <img src="@/assets/images/logo.svg" alt="logo" /> -->
					<span v-show="!isCollapse">快速开发平台</span>
				</div>
				<el-scrollbar>
					<el-menu
						:default-active="activeMenu"
						:router="false"
						:collapse="isCollapse"
						:collapse-transition="false"
						:unique-opened="true"
					>
						<SubMenu :menuList="menuList" />
					</el-menu>
				</el-scrollbar>
			</div>
		</el-aside>
		<el-container>
			<el-header>
				<ToolBarLeft />
				<ToolBarRight />
			</el-header>
			<!-- <el-scrollbar> -->
			<Main />
			<!-- </el-scrollbar> -->
		</el-container>
	</el-container>
</template>

<script setup lang="ts" name="layoutVertical">
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { GlobalStore } from '@/stores';
import { AuthStore } from '@/stores/modules/auth';
import Main from '@/layouts/components/Main/index.vue';
import ToolBarLeft from '@/layouts/components/Header/ToolBarLeft.vue';
import ToolBarRight from '@/layouts/components/Header/ToolBarRight.vue';
import SubMenu from '@/layouts/components/Menu/SubMenu.vue';
const route = useRoute();
const authStore = AuthStore();
const globalStore = GlobalStore();
const activeMenu = computed(() => (route.meta.activeMenu ? route.meta.activeMenu : route.path));
const menuList = computed(() => authStore.showMenuListGet);

const isCollapse = computed(() => globalStore.themeConfig.isCollapse);
// const themeConfig = computed(() => globalStore.themeConfig);

// alert(import.meta.env.MODE);
</script>

<style scoped lang="scss">
@import './index.scss';
</style>
